home *** CD-ROM | disk | FTP | other *** search
- /************************************************************************
-
- This header file contains the register structure required to call
- the C86 sysint() call and a few useful functions using sysint().
- Include this file using #include <sysint.h> and then use these
- functions any where in your program. These will only work on the
- IBM PC or compatibles using the Computer Inovations C86 compiler.
-
- Dec 1984 Mike Elkins "C" BBS
-
- *************************************************************************/
-
- struct regval { int ax,bx,cx,dx,si,di,ds,es; } regbefore, regafter;
-
- /* Position cursor at row x, col y */
- gotoxy( x, y)
- int x, y;
- {
- regbefore.ax = 0x0200;
- regbefore.dx = ((x * 0x100) + y);
- sysint(0x10, ®before, ®after);
- }
- /* Clear the screen */
- cls()
- {
- regbefore.ax = 0x03;
- regbefore.bx = regbefore.cx = regbefore.dx = 0;
- sysint(0x10, ®before, ®after);
- }
- /* Set cursor size top x, bottom y. 0 is top and 7 is bottom on a graphic
- monitor, 13 is bottom on a monocrome monitor. cursor(14,14); will turn
- the cursor off, cursor(0,7); will make the cursor solid. Default size
- is cursor(6,7); on a graphics monitor and cursor(12,13) on a monocrome */
- cursor( x, y)
- int x, y;
- {
- regbefore.ax = 0x0100;
- regbefore.bx = regbefore.dx = 0;
- regbefore.cx = ((x * 0x100) + y);
- sysint(0x10, ®before, ®after);
- }